docs: Update Google Sign-In setup and configuration documentation#471
docs: Update Google Sign-In setup and configuration documentation#471
Conversation
| 1. Go to the [Google Cloud Console](https://console.cloud.google.com/). | ||
|
|
||
| To implement Google Sign In, you need a Google Cloud project. You can create one in the [Google Cloud Console](https://console.cloud.google.com/). | ||
| 2. Create a new project (or select an existing one). |
There was a problem hiding this comment.
The button for creating a new project could potentially be hard to find. We could either
a. link to the google's own how-to guide for this: https://developers.google.com/workspace/guides/create-project
b. Link directly to the page: https://console.cloud.google.com/projectcreate and add a screenshot and some explanation on what fields to fill in.
There was a problem hiding this comment.
i think b. is a better option
…on setup, and match actual Serverpod 3.4.7 template
…nfiguration steps and added branding image
… and publishing process
597bcee to
3a54bce
Compare
| :::warning | ||
| **Never commit `config/passwords.yaml` to version control.** It contains your OAuth client secret. Use environment variables or a secrets manager in production. | ||
|
|
||
| **Carefully maintain correct indentation for YAML block scalars.** The `googleClientSecret` block uses a `|`; any indentation error will silently break the JSON, resulting in authentication failures. |
There was a problem hiding this comment.
There are two different warnings inside this warning block. Suggestion: maybe separate into two warning blocks or put the YAML block scalar as a ':::note' instead.
| 1. Go to the [Google Cloud Console](https://console.cloud.google.com/). | ||
|
|
||
| To implement Google Sign In, you need a Google Cloud project. You can create one in the [Google Cloud Console](https://console.cloud.google.com/). | ||
| 2. Create a new project (or select an existing one). |
|
|
||
| :::tip | ||
| You can use the `GoogleIdpConfigFromPasswords` constructor in replacement of the `GoogleIdpConfig` above to automatically load the client secret from the `config/passwords.yaml` file or environment variables. It will expect the `googleClientSecret` key on the file or the `SERVERPOD_PASSWORD_googleClientSecret` environment variable. | ||
| If you need more control over how the client secret is loaded, you can use `GoogleIdpConfig(clientSecret: GoogleClientSecret.fromJsonString(...))` instead. See the [customizations](./customizations) page for details. |
There was a problem hiding this comment.
Do you think we should move this to "Customizations"?
There was a problem hiding this comment.
Yes we talk about GoogleIdpConfigFromPasswords later down in Add the Google identity provider
…structure, including new sections for adding the identity provider and creating endpoints
| Skipping the migration will cause the server to crash at runtime when the Google provider tries to read or write user data. More detailed instructions can be found in the general [identity providers setup section](../../setup#identity-providers-configuration). | ||
| ::: | ||
|
|
||
| ### Basic configuration options |
There was a problem hiding this comment.
Trying to simplify the guide. Is this section really needed on this page? It is a bit confusing that it mentions client secret as something required. Could be interpreted that this has to be setup.
|
|
||
| ```bash | ||
| serverpod generate | ||
| serverpod create-migration |
| ### iOS | ||
|
|
||
| Create the client credentials in the Google Auth Platform. Navigate to _Clients_ and click _Create Client_. Configure the OAuth client as Application type _**iOS**_. | ||
| 1. In the Google Auth Platform, navigate to **Clients** and click **Create Client**. |
There was a problem hiding this comment.
Maybe link this for convenience, in case the user closed the page by now.
There was a problem hiding this comment.
They can always easily navigate to this page
…uration image for improved clarity
…etup documentation for improved clarity
…eference and adding troubleshooting steps for improved clarity
…ormation and clarifying client secret loading options
…ce of the web OAuth client entry in the `google-services.json` file
…from Google OAuth setup documentation to streamline content

Problem
The Sign in with Google docs lacked screenshots for the Google Cloud Console setup steps, had no clear separation between what iOS, Android, and Web each require, and didn't explain key gotchas (YAML indentation, SHA-1 debug vs release mismatch, missing People API). There was also no troubleshooting page and the migration steps were incomplete.
Solution
serverpod create-migration), Firebase disambiguation note, and warnings for common mistakes.GoogleIdpConfigparameter reference table withpasswords.yamlkey column and environment variable equivalents section. Improved link text for accessibility.redirect_uri_mismatch, missing People API, token expiration on Web, and more.